package com.eastfair.imaster.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.core.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 论坛报名人员
 * </p>
 *
 * @author zjn
 * @since 2021-11-10
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("o_conference_user")
@ApiModel(value = "ConferenceUser", description = "论坛报名人员")
@AllArgsConstructor
public class ConferenceUser extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 论坛id
     */
    @ApiModelProperty(value = "论坛id")
    @TableField(value = "conference_id")
    @Excel(name = "论坛id")
    private Long conferenceId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @TableField(value = "user_account_id")
    @Excel(name = "用户id")
    private Long userAccountId;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称")
    @Size(max = 64, message = "用户名称长度不能超过64")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "用户名称")
    private String name;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    @Size(max = 256, message = "头像长度不能超过256")
    @TableField(value = "head_image_url", condition = LIKE)
    @Excel(name = "头像")
    private String headImageUrl;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @Size(max = 16, message = "手机号长度不能超过16")
    @TableField(value = "mobile", condition = LIKE)
    @Excel(name = "手机号")
    private String mobile;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @Size(max = 64, message = "邮箱长度不能超过64")
    @TableField(value = "email", condition = LIKE)
    @Excel(name = "邮箱")
    private String email;

    /**
     * 公司名称
     */
    @ApiModelProperty(value = "公司名称")
    @Size(max = 64, message = "公司名称长度不能超过64")
    @TableField(value = "company_name", condition = LIKE)
    @Excel(name = "公司名称")
    private String companyName;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;


    @Builder
    public ConferenceUser(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long projectId, Long conferenceId, Long userAccountId, String name, String headImageUrl, 
                    String mobile, String email, String companyName, Integer isEnabled, Integer isDeleted) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.projectId = projectId;
        this.conferenceId = conferenceId;
        this.userAccountId = userAccountId;
        this.name = name;
        this.headImageUrl = headImageUrl;
        this.mobile = mobile;
        this.email = email;
        this.companyName = companyName;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
    }

}
